﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/pages/Menu.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_pages_usuario_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Titulo" Runat="Server">
    Alterar Usuário
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Pagina" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div class="magin-auto cadastro">
        <fieldset>
            <legend><label>Alterar senha do Administrador</label></legend>
                <asp:UpdatePanel runat="server" id="Panel" >
                    <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                <label>Login</label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtLogin" runat="server" ReadOnly="true"></asp:TextBox>
                                <asp:HiddenField ID="hdId" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>
                                Nome</label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtNome" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfTxtNome" runat="server" 
                                    ControlToValidate="txtNome" ErrorMessage="Campo obrigatório!" 
                                    ValidationGroup="cadastrar">
                                </asp:RequiredFieldValidator>
                               
                            </td>
                            <tr>
                                <td>
                                    <label>
                                    Senha stual</label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtSenhaAtual" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="txtSenhaAtual" ErrorMessage="Campo obrigatório!" 
                                        ValidationGroup="cadastrar">
                                    </asp:RequiredFieldValidator>
                                    
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                    Nova senha</label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtNovaSenha" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ControlToValidate="txtNovaSenha" ErrorMessage="Campo obrigatório!" 
                                        ValidationGroup="cadastrar">
                                    </asp:RequiredFieldValidator>
                                    
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                    Confirmar nova senha</label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtNovaSenhaConfirmacao" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                        ControlToValidate="txtNovaSenhaConfirmacao" ErrorMessage="Campo obrigatório!" 
                                        ValidationGroup="cadastrar">
                                    </asp:RequiredFieldValidator>
                                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                        ControlToCompare="txtNovaSenha" ControlToValidate="txtNovaSenhaConfirmacao" 
                                        ErrorMessage="Nova senha e senha de confirmação não são iguais!" 
                                        Operator="Equal" Type="String" CssClass="ui-accordion-header"
                                        ValidationGroup="cadastrar"
                                        ></asp:CompareValidator>                                   
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btnSalvar" runat="server" 
                                        CssClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" 
                                        OnClick="Salvar" Text="Salvar"  ValidationGroup="cadastrar"/>
                                    
                                </td>
                            </tr>
                        </tr>
                    </table>
                </ContentTemplate>
                    <Triggers>
                    <asp:AsyncPostBackTrigger ControlID = "btnSalvar" EventName ="Click"/>
                </Triggers>
            </asp:UpdatePanel>
            <div class="voltar">
                <asp:LinkButton ID="lkVoltar" runat="server" CssClass="texto_cinza" PostBackUrl="~/admin/pages/Default.aspx">voltar</asp:LinkButton>
            </div>
        </fieldset>
    </div>

</asp:Content>

